package org.example.db;

import com.alibaba.dubbo.config.annotation.Reference;
import org.example.db.service.interfaces.ProviderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Consumer {
    @Reference(version = "1.0.0")
    public ProviderService service;

    @GetMapping("/hello/{name}")
    public String hello (@PathVariable("name") String name)
    {
        return service.hello(name);
    }
}
